package com.funtl.my.shop.domain;

import com.futl.my.shop.commons.persistence.BaseEntity;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author tw
 * @version 1.0
 * @date 2020/5/23 23:53
 */
@Data
public class TbContent extends BaseEntity {

    @Length(min = 1,max = 20,message = "标题长度介于1-20个字符")
    private String title;
    @Length(min = 1,max = 20,message = "子标题长度介于1-20个字符")
    private String subTitle;
    @Length(min = 1,max = 50,message = "标题描述长度介于1-20个字符")
    private String titleDesc;
    private String url;
    private String pic;
    private String pic2;
    @Length(min = 1,max = 500,message = "详情长度介于1-500个字符")
    private String content;

    @NotNull(message = "父级类目不能为空")
    private TbContentCategory tbContentCategory;
}
